package niuke;


import java.util.Scanner;

public class 藏宝图 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String a = scanner.nextLine();
        String b = scanner.nextLine();
        int k=0;
        int count = b.length();
        for(int j=0;j<b.length();j++){
            for(;k<a.length();k++){
                if(a.charAt(k) == b.charAt(j)){
                    count--;
                    k++;
                    break;
                }
            }
            if(count+j == b.length()){
                System.out.println("No");
                return;
            }
        }
        if(count == 0){
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
}
